package com.zzyl.task;

import com.zzyl.service.customer.ReservationService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;

/**
 * @Description MyTask
 * @Author liangDong
 * @Date 2025-05-18  9:59
 */
@Component
@Slf4j
public class MyTask {
    @Autowired
    private ReservationService reservationService;

    @Scheduled(cron = " 0 0 0 * * ?")
    public void clearReservationCancelledCount(){
        reservationService.clearCancelledCount();
    }

}
